import * as types from '../action-types'
let initstate=1;
export const counter = (state = initstate, action) => {
    switch (action.type) {
        case types.ADDITION:
            return state+=action.count
        case types.SUBTRACTION:
            return state-=action.count
        default:
            return state
    }
}